package com.server.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import com.server.service.IAmountService;
import com.server.service.ICommonDataService;
import com.server.web.DataVector;
import com.server.web.RequestInput;

@Service("AmountService")
public class AmountService implements IAmountService {
	
	private static final String TABLE_NAME = "reward.reward";

	@Autowired
	private JdbcTemplate jdbcTemplate;
	@Autowired
	private ICommonDataService commonDataService;
	
	@Override
	public DataVector<Map<String, Object>> getList(RequestInput requestInput, 
			String cardId,Integer type){
		
		String whereStr = String.format("CardID='%s' and state=%s ", cardId,type);
		String sortStr = "RewardTime desc";
		return commonDataService.getListData(TABLE_NAME, whereStr, sortStr, requestInput);
	} 
	
}
